# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-pytzdata
_pkgname=pytzdata
pkgver=2020.1
pkgrel=11
pkgdesc='The Olson timezone database for Python.'
arch=('any')
url='https://pypi.org/project/pytzdata/#files'
license=('MIT')
depends=('python' 'python-cleo')
makedepends=('python-build' 'python-pip' 'python-wheel')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('4ca1eccc92cf116754b1d7635f2643143c46fa839ab16c7673855d270ae94ba83e31a4e0904e4792c1f35eb99c2d07b06aaf15b3e3dc32dc603f8837d631ee0c')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

